var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var n in e) e.hasOwnProperty(n) && (t[n] = e[n]);
    })(t, e);
}, function(t, e) {
    function n() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, 
    new n());
}), a = this && this.__decorate || function(t, e, n, o) {
    var a, c = arguments.length, i = c < 3 ? e : null === o ? o = Object.getOwnPropertyDescriptor(e, n) : o;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) i = Reflect.decorate(t, e, n, o); else for (var r = t.length - 1; 0 <= r; r--) (a = t[r]) && (i = (c < 3 ? a(i) : 3 < c ? a(e, n, i) : a(e, n)) || i);
    return 3 < c && i && Object.defineProperty(e, n, i), i;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("GameData"), s = e("AudioManager"), c = e("UIManager"), l = e("WebManager"), d = e("Global"), u = e("PrefabView"), p = cc._decorator, h = p.ccclass, f = (p.property, 
function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.isChristmasPop = 1, t;
    }
    return i(t, e), t.prototype.onClickBack = function() {
        s.default.getInstance().playAudio("按钮2"), l.default.getInstance().sentLog("点击圣诞活动返回按键"), 
        r.GD.isChristmasPop = this.isChristmasPop, this.hidePnl();
    }, t.prototype.onClickGet = function() {
        s.default.getInstance().playAudio("按钮2"), l.default.getInstance().sentLog("点击圣诞活动抽奖按键"), 
        4 != r.GD.personIdx ? (this.onClickBack(), c.default.getInstance().loadPnl("skin", null, function() {
            c.default.getInstance().hideAllPnl();
        }).then(function(t) {
            t.onClickSkin();
        })) : this.onClickBack();
    }, t.prototype.onToggle = function(t) {
        t.isChecked ? this.isChristmasPop = 0 : this.isChristmasPop = 1;
    }, t.prototype.onEnable = function() {
        cc.tween(this.node).to(.1, {
            scale: 1.1
        }).to(.1, {
            scale: 1
        }).call(function() {}).start();
    }, t.prototype.onDisable = function() {
        var t;
        0 < d.G.queue.length && (1 == (t = d.G.queue.shift()).type ? c.default.getInstance().loadPnl(t.name) : 2 == t.type && c.default.getInstance().loadPopPnl(t.name, t.data)), 
        e.prototype.onDisable.call(this);
    }, a([ h ], t);
}(u.default));

n.default = f;